<?php
include "phpQuery.php";
include "QueryList.php";
use QL\QueryList;
$url='http://www.17k.com/book/1398783.html';
//echo $url;
$rules=[
    //'level'=>['tr>td','text'],
    'click'=>['#weekclickCount','text'],
];
$data=QueryList::Query($url,$rules,'','utf-8')->data;
print_r($data);die;
foreach($data[0] as $key=>$value)
{
    $arr_meg['power_level']=$data[0][$key];
    $arr_meg['typee']=$data[1][$key];
    $dbh=new PDO('mysql:host=localhost;dbname=gaofei','root','root');
    $sql="insert into bb(power_level,typee) VALUES('{$arr_meg['power_level']}','{$arr_meg['typee']}')";
    $dbh->exec($sql);

}
//print_r($data);die;
//$url='http://www.17k.com/';
////echo $url;
//$rules=[
//    'title'=>['.Top1>li>a','text'],
//    ///'level'=>['tr>th','text'],
//];
//$data=QueryList::Query($url,$rules,'','utf-8')->data;
//print_r($data);

